/* 存放薪酬相关路由 */

import { DEFAULT_LAYOUT } from '../base';
// import DEFAULT_LAYOUT from '@/layout/default-layout.vue'
import { AppRouteRecordRaw } from '../types';
import salaryBaseSettingIndexSubRoutes from './salary/baseSetting';
import homeSub from './homeSub';

const CONTRACT: AppRouteRecordRaw = {
  path: '/salary',
  name: 'Salary',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '薪酬',
    requiresAuth: true,
    icon: 'icon-home',
    order: 5,
    hideInMenu: false,
    key: '6',
    roles: ['admin']
  },
  redirect: {
    name: 'SalaryBaseSetting'
  },
  children: [
    ...homeSub,
    {
      path: 'salaryBaseSetting',
      name: 'SalaryBaseSetting',
      component: () =>
        import('@/views/Management/Salary/BaseSetting/index.vue'),
      meta: {
        locale: '薪酬基础设置',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    {
      path: 'MonthSalary',
      name: 'monthSalary',
      component: () =>
        import('@/views/Management/Salary/MonthSalary/index.vue'),
      meta: {
        locale: '月工资表',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    {
      path: 'salaryPayroll',
      name: 'SalaryPayroll',
      component: () => import('@/views/Management/Salary/Payroll/index.vue'),
      meta: {
        locale: '工资发放',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    {
      path: 'employeeSalary',
      name: 'EmployeeSalary',
      component: () =>
        import('@/views/Management/Salary/EmployeeSalary/index.vue'),
      meta: {
        locale: '员工薪资',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    {
      path: 'salaryStatement',
      name: 'SalaryStatement',
      component: () =>
        import('@/views/Management/Salary/SalaryStatement/index.vue'),
      meta: {
        locale: '薪酬报表',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    {
      path: 'salaryAnalyze',
      name: 'SalaryAnalyze',
      component: () =>
        import('@/views/Management/Salary/SalaryAnalyze/index.vue'),
      meta: {
        locale: '薪酬分析',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    {
      path: 'salaryYearEndBonus',
      name: 'SalaryYearEndBonus',
      component: () =>
        import('@/views/Management/Salary/YearEndBonus/index.vue'),
      meta: {
        locale: '年终奖计算',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    {
      path: 'salaryPaySheet',
      name: 'SalaryPaySheet',
      component: () => import('@/views/Management/Salary/PaySheet/index.vue'),
      meta: {
        locale: '发送工资条',
        requiresAuth: true,
        icon: 'icon-jichushezhi',
        roles: ['*'],
        hideInMenu: false
      }
    },
    ...salaryBaseSettingIndexSubRoutes
  ]
};

export default CONTRACT;
